import request from '@/utils/request'

// 查询规格属性列表
export function listRuleinfo(query) {
  return request({
    url: '/product/ruleinfo/list',
    method: 'get',
    params: query
  })
}

// 查询规格属性详细
export function getRuleinfo(id) {
  return request({
    url: '/product/ruleinfo/' + id,
    method: 'get'
  })
}

// 新增规格属性
export function addRuleinfo(data) {
  return request({
    url: '/product/ruleinfo',
    method: 'post',
    data: data
  })
}

// 修改规格属性
export function updateRuleinfo(data) {
  return request({
    url: '/product/ruleinfo',
    method: 'put',
    data: data
  })
}

// 删除规格属性
export function delRuleinfo(id) {
  return request({
    url: '/product/ruleinfo/' + id,
    method: 'delete'
  })
}
